package com.pylc.service.impl;

import com.pylc.model.dao.AreaDao;
import com.pylc.model.entity.Area;
import com.pylc.service.AreaService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Set;

/**
 * @author Lindsey
 */
@Service
public class AreaServiceImpl extends BaseServiceImpl<Area, Long> implements AreaService {
    @Resource
    private AreaDao areaDao;

    @Resource
    public void setBaseDao(AreaDao areaDao) {
        super.setBaseDao(areaDao);
    }

    @Override
    public Set<Area> getRoot() {
        return areaDao.getRoot();
    }

    @Override
    public Area getParent(Area area) {
        return areaDao.getParent(area);
    }

    @Override
    public Set<Area> getChildren(Area area) {
        return areaDao.getChildren(area);
    }

    @Override
    public Boolean isNameUnique(Long parentId, String name) {
        return areaDao.isNameUnique(parentId, name);
    }

    @Override
    public Boolean isAreaPath(String areaPath) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public String getAreaString(Area area) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public String getAreaString(String areaPath) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
